CC = gcc

CFLAGS = -Wall -g

RM = rm -f

OBJS = main.c entrada.c matriz.c grafo.c atlanticon.c dijkstra.c

MAIN = tp1

$(MAIN): $(OBJS)
	@echo ""
	@echo " --- COMPILANDO PROGRAMA ---"
	@$(CC) $(CFLAGS) $(OBJS) -lm -o $(MAIN)
	@echo ""

%.o: %.c %.h
	@echo " --- COMPILANDO OBJETO \"$@\""
	@$(CC) $(CFLAGS) $< -c 

clean:
	$(RM) $(MAIN) *.o
	clear

run: $(MAIN)
	./$(MAIN) -i entrada -o saida
